import request from '@/utils/request'

const cardealershipLists = {
  lists: '/api/v2/scooter-rentals'
}

export function getCardealershipLists (paramter) {
  return request({
    url: cardealershipLists.lists,
    method: 'get',
    params: paramter
  })
}

export function getCardealership (id) {
  return request({
    url: cardealershipLists.lists + '/' + id
  })
}

export function deleteCardealership (id) {
  return request({
    url: cardealershipLists.lists + '/' + id,
    method: 'delete'
  })
}

export function updateCardealership (id, data) {
  return request({
    url: cardealershipLists.lists + '/' + id,
    method: 'put',
    data: data
  })
}

export function addCardealership (data) {
  return request({
    url: cardealershipLists.lists,
    method: 'post',
    data: data
  })
}
